﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Clandestine.Audio
{
    internal abstract class Buffer
    {
		protected Audio audio;
		
		public Buffer(Audio audio, string identifier)
		{
			this.audio = audio;
		}
		
		internal static Buffer AutoCreateBuffer(Audio audio, string filename, int sourceId)
		{
			Decoder decoder = Decoder.AutoCreateDecoder(filename);
			return new StreamingBuffer(audio, filename, decoder, sourceId);
		}
		
		internal abstract void Destroy();
    }
}
